package creator.ui.graphics.polaroid;

import creator.ui.graphics.Magicanvas;
import creator.ui.graphics.bean.Bean;
import java.util.ArrayList;

public abstract class Animation extends Thread implements PolaroidSpring {

  public Magicanvas MAGICANVAS;
  public ArrayList<Bean> BEANS;
  private Object obj;

  public Magicanvas getMagicanvas() {
    return this.MAGICANVAS;
  }

  public void loadBeanParameter(Magicanvas magicanvas) {
    this.obj = new Object();

    this.BEANS = new ArrayList();
    loadBean();

    this.MAGICANVAS = magicanvas;
    for (Bean bean : this.BEANS) bean.initBean(this.MAGICANVAS);
  }

  public abstract void run();

  public ArrayList<Bean> getBeans() {
    return this.BEANS;
  }

  public Object getSyObject() {
    return this.obj;
  }
}
